using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
using QlyKinhDoanh.Utility;

namespace prjQlyKinhDoanh
{
    public partial class frmReportByAreaViewer : Form
    {
        string _sTuNgay, _sDenNgay;
        int _iDiaBanId;
        public frmReportByAreaViewer()
        {
            InitializeComponent();
        }

        public frmReportByAreaViewer(string strTuNgay, string strDenNgay, int iDiaBanId)
        {
            InitializeComponent();
            _sTuNgay = strTuNgay;
            _sDenNgay = strDenNgay;
            _iDiaBanId = iDiaBanId;
        }

        private void frmReportByAreaViewer_Load(object sender, EventArgs e)
        {
            string ReportFile = Declare.ReportPath + "rptReportByArea.rpt";

            string[] paraName = new string[4];
            paraName[0] = "@iDiaBanId";
            paraName[1] = "@iLoaiHoSoId";
            paraName[2] = "@sCapTuNgay";
            paraName[3] = "@sCapDenNgay";

            object[] paraValue = new object[4];
            paraValue[0] = Common.IntValue(_iDiaBanId.ToString());
            paraValue[1] = 0;
            paraValue[2] = _sTuNgay;
            paraValue[3] = _sDenNgay;
            ReportUtility.LoadReportFile(ReportFile, crystalReportViewer1, paraName, paraValue);

        }
    }
}